function showModalDialog(width, height, title, contentText){
	/* 创建遮罩层 */
	var bodyBack = document.createElement('div');
	bodyBack.setAttribute('id','bodyback_');
	bodyBack.style.position = "absolute";
	bodyBack.style.width = "100%";
	bodyBack.style.height = jQuery(document).height() + 'px';
	bodyBack.style.zIndex = 99997;
	bodyBack.style.top = 0;
	bodyBack.style.left = 0;
	bodyBack.style.filter = "alpha(opacity=5)";
	bodyBack.style.opacity = 0.05;
	bodyBack.style.background = "#000000";	
	
	/* 创建内容边框层 */
	var content = document.createElement('div');
	content.setAttribute('id','content');
	content.style.width = width +'px';
	content.style.height = height +'px';
	content.style.filter = "alpha(opacity=30)"; 
	content.style.opacity = 0.3;
	content.style.background = '#000000';
	content.style.top = ((jQuery(window).height() - height)/2 + jQuery(document).scrollTop())+ 'px';
	content.style.left = (jQuery(window).width() - width)/2 + 'px';
	content.style.position = 'absolute';
	content.style.zIndex = 99998;
	
	/* 创建内容展示层 */
	var content_ = document.createElement('div');
	content_.setAttribute('id','content_');
	content_.style.width = (width - 16) +'px';
	content_.style.height = (height - 16) +'px';
	content_.setAttribute('class','greybox');
	content_.style.position = 'absolute';
	content_.style.zIndex = 999999;
	content_.style.background = "#ffffff";
	content_.style.top = ((jQuery(window).height() - height + 16)/2  + jQuery(document).scrollTop()) + 'px';
	content_.style.left = (jQuery(window).width() - width + 16)/2 + 'px';
	
	if(navigator.appName == "Microsoft Internet Explorer"){
		content_.innerHTML = '<span class="box_title" style="display:block;margin-top:10px;overflow:hidden;"><h2 style="color:#7A7A7A;float:left;font-size:14px;font-weight:bold;margin-left:10px;">'+title+'</h2><a href="javascript:close_dialog();" id="close_dialog" alt="关闭" title="关闭" style="display:block;background:url(/Public/Index/imgs/images/icon.gif) no-repeat scroll left top transparent;float:right;height:18px;margin-right:10px;width:18px;"></a></span><div class="blank10"></div>' + contentText;
	}else{
		content_.innerHTML = '<span class="box_title"><h2>'+title+'</h2><a href="javascript:close_dialog();" id="close_dialog" alt="关闭" title="关闭"></a></span><div class="blank10"></div>' + contentText;
	}
	document.body.appendChild(bodyBack);
	document.body.appendChild(content_);
	document.body.appendChild(content);
}

function close_dialog(){
	document.body.removeChild(document.getElementById('content'));
	document.body.removeChild(document.getElementById('content_'));
	document.body.removeChild(document.getElementById('bodyback_'));
}

function message_baogd(content){
	if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion .split(";")[1].replace(/[ ]/g,"")=="MSIE7.0"){
		showModalDialog(800,600,'服务条款','<div class="treaty" style="width:350px;"><span class="at_msg" style="display:block;padding-left:15px;"><p style="color:#656565;float:left;line-height:44px;margin-left:10px;">'+content+'</p></span><div class="blank10"></div>');
	}else{
		showModalDialog(800,600,'服务条款','<div class="treaty"><span class="at_msg"><p>'+content+'</p></span><div class="blank10"></div></div>');
	}
}